﻿using System.Collections.Generic;
using Scrum.Net.Interfaces;
using Scrum.Net.Utilities;

namespace Scrum.Net.Classes
{
    public class Story : ObservableObject, IStory
    {
        private string _name;
        private string _description;
        private readonly IList<ITask> _tasks;
        private int _hours;

        public string Name
        {
            get { return _name; }
            set
            {
                _name = value;
                RaisePropertyChanged("Name");
            }
        }

        public string Description
        {
            get { return _description; }
            set
            {
                _description = value;
                RaisePropertyChanged("Description");
            }
        }

        public int Hours
        {
            get { return _hours; }
            set
            { 
                _hours = value;
                RaisePropertyChanged("Hours");
            }
        }

        public IList<ITask> Tasks
        {
            get { return _tasks; }
        }

        public Story (string name)
        {
            _name = name;
            _tasks = new List<ITask>();
        }
    }

    public class ProductStory : Story, IProductStory
    {
        private int _priority;

        public int Priority
        {
            get { return _priority; }
            set
            {
                _priority = value;
                RaisePropertyChanged("Priority");
            }
        }

        public ProductStory(string name) : base(name)
        {
        }
    }

    public class SprintStory : Story, ISprintStory
    {
        private int _points;

        public int Points
        {
            get { return _points; }
            set
            {
                _points = value;
                RaisePropertyChanged("Points");
            }
        }

        public SprintStory(string name) : base(name)
        {

        }
    }
}